public class Person
{
    private String name;
    private int    count = 0;

    public Person(String aName)           { name = aName;   }
    public String getName()               { return name;    }
    public void   setName(String newName) { name = newName; }
    public void   poke()                  { ++count; System.out.println(name +" was poked");        }
    public String getGreeting()
    {
        return "Hello, " + name + ", do you know Java? ("
            + count + " pokes)";
    }
}
